<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Struct template pointer_plus_bits&lt;T *, NumBits&gt;</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../intrusive/reference.html#doxygen.pointer__plus__bits_8hpp" title="Header &lt;boost/intrusive/pointer_plus_bits.hpp&gt;">
<link rel="prev" href="structboost_1_1intrusive_1_1pointer__plus__bits.html" title="Struct template pointer_plus_bits">
<link rel="next" href="structboost_1_1intrusive_1_1pointer__has__rebind.html" title="Struct template pointer_has_rebind">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1intrusive_1_1pointer__plus__bits.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrusive/reference.html#doxygen.pointer__plus__bits_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="structboost_1_1intrusive_1_1pointer__has__rebind.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct template pointer_plus_bits&lt;T *, NumBits&gt;</span></h2>
<p>boost::intrusive::pointer_plus_bits&lt;T *, NumBits&gt;</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../intrusive/reference.html#doxygen.pointer__plus__bits_8hpp" title="Header &lt;boost/intrusive/pointer_plus_bits.hpp&gt;">boost/intrusive/pointer_plus_bits.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> NumBits<span class="special">&gt;</span> 
<span class="keyword">struct</span> <a class="link" href="structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4.html" title="Struct template pointer_plus_bits&lt;T *, NumBits&gt;">pointer_plus_bits</a><span class="special">&lt;</span><span class="identifier">T</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">NumBits</span><span class="special">&gt;</span> <span class="special">{</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="special">*</span> <a name="doxygen.structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4_1a6ecdbcb6801622cfea7e95ec0b4aa772"></a><span class="identifier">pointer</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="boost_interprocess_header_reference/classboost_1_1interprocess_1_1segment__manager__base.html#id58-bb">public static functions</a></span>
  <span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4.html#doxygen.structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4_1a33e56d1c2cb64ede85bcbb6aa011d1c3"><span class="identifier">get_pointer</span></a><span class="special">(</span><span class="identifier">pointer</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4.html#doxygen.structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4_1a4ddc98cf5597d2e61be30fe87023b34a"><span class="identifier">set_pointer</span></a><span class="special">(</span><span class="identifier">pointer</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">pointer</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4.html#doxygen.structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4_1a603dda111b20d65086122c289fb435a1"><span class="identifier">get_bits</span></a><span class="special">(</span><span class="identifier">pointer</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4.html#doxygen.structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4_1a0a5e61e0d7aa762f4d3715f9b062ee73"><span class="identifier">set_bits</span></a><span class="special">(</span><span class="identifier">pointer</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>

  <span class="comment">// public data members</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">uintptr_t</span> <span class="identifier">Mask</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.17.42.24.6.4"></a><h2>Description</h2>
<p>This is the specialization to embed extra bits of information in a raw pointer. The extra bits are stored in the lower bits of the pointer. </p>
<div class="refsect2">
<a name="id-1.3.17.42.24.6.4.3"></a><h3>
<a name="id58-bb"></a><code class="computeroutput">pointer_plus_bits</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pointer</span> <a name="doxygen.structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4_1a33e56d1c2cb64ede85bcbb6aa011d1c3"></a><span class="identifier">get_pointer</span><span class="special">(</span><span class="identifier">pointer</span> n<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4_1a4ddc98cf5597d2e61be30fe87023b34a"></a><span class="identifier">set_pointer</span><span class="special">(</span><span class="identifier">pointer</span> <span class="special">&amp;</span> n<span class="special">,</span> <span class="identifier">pointer</span> p<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="doxygen.structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4_1a603dda111b20d65086122c289fb435a1"></a><span class="identifier">get_bits</span><span class="special">(</span><span class="identifier">pointer</span> n<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.structboost_1_1intrusive_1_1pointer__plus__bits_3_01T_01_5_00_01NumBits_01_4_1a0a5e61e0d7aa762f4d3715f9b062ee73"></a><span class="identifier">set_bits</span><span class="special">(</span><span class="identifier">pointer</span> <span class="special">&amp;</span> n<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> c<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2005 Olaf Krzikalla<br>Copyright © 2006-2015 Ion Gaztanaga<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1intrusive_1_1pointer__plus__bits.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrusive/reference.html#doxygen.pointer__plus__bits_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="structboost_1_1intrusive_1_1pointer__has__rebind.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
